package com.SpringMVC.config;

import com.SpringMVC.WebBindingInitializer.MyWebBindingInitializer;
import com.SpringMVC.simulation.SimulationRequestHandlerMapping;
import org.springframework.context.annotation.Bean;
import org.springframework.web.servlet.HandlerAdapter;
import org.springframework.web.servlet.HandlerMapping;
import org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter;

/**
 * Created by 41579 on 2017/5/23.
 */
public class SimulationHandlerConfig {

    @Bean
    public HandlerMapping simulationHandlerMapping() {
        return new SimulationRequestHandlerMapping();
    }

    @Bean
    public HandlerAdapter handlerAdapter() {
        RequestMappingHandlerAdapter adapter = new RequestMappingHandlerAdapter();
        adapter.setWebBindingInitializer(new MyWebBindingInitializer());
        return adapter;
    }
}
